//
//  UIImageView+ImageEffects.h
//  MyFunctionDemo
//
//  Created by Ting Han on 2017/9/19.
//  Copyright © 2017年 Ting Han. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage (ImageEffects)

#pragma mark --- blurImage
//模糊效果
- (UIImage *)blurImage;

//被另一个image遮罩的模糊效果
- (UIImage *)blurImageWithMask:(UIImage *)maskImage;

//模糊效果，并可以设置radius
- (UIImage *)blurImageWithRadius:(CGFloat)radius;

//模糊效果，并规定范围
- (UIImage *)blurImageAtFrame:(CGRect)frame;

#pragma mark --- GrayScale Image
- (UIImage *)grayScale;

#pragma mark --- 
- (UIImage *)scaleWithFixedWidth:(CGFloat)width;
- (UIImage *)scaleWithFixedHeight:(CGFloat)height;
- (UIColor *)averageColor;
- (UIImage *)croppedImageAtFrame:(CGRect)frame;


@end
